#!/bin/bash

timestamp=$(date +%Y%m%d_%H%M%S)

case $RR_ID in
qtruck[1-9])
/bin/bash -c "source /home/westwell/welldriver/devel/setup.bash; rosbag record /active_safety /cam_state_visual /cam_state_visual2 /cam_odom /control_info /control_sequence /correct_state_visual /load_status /cps_info /debug_image /downsample_points /detected_carlane /error_code /fusion_odom /global_trajectory /gps_info /gps_odom /gps_state_visual /init_odom /lane_change_signal /lanelet2_map /lanelet2_map_viz /lidar_road_info /lidar_state_visual /local_trajectory /location_status /monitor_info /nopass_area /nopass_area_visual /obstacle_visual /odom_state_visual /origin_odom /planned_target /path_with_vehicle /routing_path /rtgc_infos /ship_location /slam_odom /slam_state_visual /speed_limit /stereo_road_info /stop_dis  /tf /trajectory /trailer_angle /task_info /turn_mode /task_finish /vehicle_info /vehicle_state /vehicle_param /warning_code /weight_reset -O ${RR_ID}_${timestamp}.bag  --split --duration 60 --max-splits 20;"
;;
qtruck[1-9][0-9])
/bin/bash -c "source /home/westwell/welldriver/devel/setup.bash; rosbag record /active_safety /cam_state_visual /cam_state_visual2 /cam_odom /control_info /control_sequence /correct_state_visual /load_status /cps_info /debug_image /downsample_points /detected_carlane /error_code /fusion_odom /global_trajectory /gps_info /gps_odom /gps_state_visual /init_odom /lane_change_signal /lanelet2_map /lanelet2_map_viz /lidar_road_info /lidar_state_visual /local_trajectory /location_status /monitor_info /nopass_area /nopass_area_visual /obstacle_visual /odom_state_visual /origin_odom /planned_target /path_with_vehicle /routing_path /rtgc_infos /ship_location /slam_odom /slam_state_visual /speed_limit /stereo_road_info /stop_dis  /tf /trajectory /trailer_angle /task_info /turn_mode /task_finish /vehicle_info /vehicle_state /vehicle_param /warning_code /weight_reset -O ${RR_ID}_${timestamp}.bag  --split --duration 60 --max-splits 20;"
;;
qtruck_en[3-4])
/bin/bash -c "source /home/westwell/welldriver/devel/setup.bash; rosbag record /active_safety /cam_state_visual /cam_state_visual2 /cam_odom /control_info /control_sequence /correct_state_visual /load_status /cps_info /debug_image /downsample_points /detected_carlane /error_code /fusion_odom /global_trajectory /gps_info /gps_odom /gps_state_visual /init_odom /lane_change_signal /lanelet2_map /lanelet2_map_viz /lidar_road_info /lidar_state_visual /local_trajectory /location_status /monitor_info /nopass_area /nopass_area_visual /obstacle_visual /odom_state_visual /origin_odom /planned_target /path_with_vehicle /routing_path /rtgc_infos /ship_location /slam_odom /slam_state_visual /speed_limit /stereo_road_info /stop_dis  /tf /trajectory /trailer_angle /task_info /turn_mode /task_finish /vehicle_info /vehicle_state /vehicle_param /warning_code /weight_reset -O ${RR_ID}_${timestamp}.bag  --split --duration 60 --max-splits 20;"
;;
igv[1-9])
/bin/bash -c "source /home/westwell/welldriver/devel/setup.bash; rosbag record /active_safety /cam_state_visual /cam_state_visual2 /cam_odom /control_info /control_sequence /correct_state_visual /load_status /cps_info /debug_image /downsample_points /detected_carlane /error_code /fusion_odom /global_trajectory /gps_info /gps_odom /gps_state_visual /init_odom /lane_change_signal /lanelet2_map /lanelet2_map_viz /lidar_road_info /lidar_state_visual /local_trajectory /location_status /monitor_info /nopass_area /nopass_area_visual /obstacle_visual /odom_state_visual /origin_odom /planned_target /path_with_vehicle /routing_path /rtgc_infos /ship_location /slam_odom /slam_state_visual /speed_limit /stereo_road_info /stop_dis  /tf /trajectory /trailer_angle /task_info /turn_mode /task_finish /vehicle_info /vehicle_state /vehicle_param /warning_code /weight_reset -O /data/wellpilot/${RR_ID}_${timestamp}.bag  --split --duration 60 --max-splits 20;"
;;
igv[1-9][0-9])
/bin/bash -c "source /home/westwell/welldriver/devel/setup.bash; rosbag record /active_safety /cam_state_visual /cam_state_visual2 /cam_odom /control_info /control_sequence /correct_state_visual /load_status /cps_info /debug_image /downsample_points /detected_carlane /error_code /fusion_odom /global_trajectory /gps_info /gps_odom /gps_state_visual /init_odom /lane_change_signal /lanelet2_map /lanelet2_map_viz /lidar_road_info /lidar_state_visual /local_trajectory /location_status /monitor_info /nopass_area /nopass_area_visual /obstacle_visual /odom_state_visual /origin_odom /planned_target /path_with_vehicle /routing_path /rtgc_infos /ship_location /slam_odom /slam_state_visual /speed_limit /stereo_road_info /stop_dis  /tf /trajectory /trailer_angle /task_info /turn_mode /task_finish /vehicle_info /vehicle_state /vehicle_param /warning_code /weight_reset -O /data/wellpilot/${RR_ID}_${timestamp}.bag  --split --duration 60 --max-splits 20;"
;;
igv1050)
/bin/bash -c "source /home/westwell/welldriver/devel/setup.bash; rosbag record /active_safety /cam_state_visual /cam_state_visual2 /cam_odom /control_info /control_sequence /correct_state_visual /load_status /cps_info /debug_image /downsample_points /detected_carlane /error_code /fusion_odom /global_trajectory /gps_info /gps_odom /gps_state_visual /init_odom /lane_change_signal /lanelet2_map /lanelet2_map_viz /lidar_road_info /lidar_state_visual /local_trajectory /location_status /monitor_info /nopass_area /nopass_area_visual /obstacle_visual /odom_state_visual /origin_odom /planned_target /path_with_vehicle /routing_path /rtgc_infos /ship_location /slam_odom /slam_state_visual /speed_limit /stereo_road_info /stop_dis  /tf /trajectory /trailer_angle /task_info /turn_mode /task_finish /vehicle_info /vehicle_state /vehicle_param /warning_code /weight_reset -O /data/wellpilot/${RR_ID}_${timestamp}.bag  --split --duration 60 --max-splits 20;"
;;
esac